<template>
  <div class="child">
    <p>子组件</p>
    <select :value="cityId" @change="handleSelect">
      <option value="101">北京</option>
      <option value="102">上海</option>
      <option value="103">武汉</option>
      <option value="104">广州</option>
      <option value="105">深圳</option>
    </select>
  </div>
</template>

<script>
export default {
  props: {
    cityId: String,
  },
  methods: {
    handleSelect(e) {
      // console.log(e.target.value);
      this.$emit("changeCityId", e.target.value);
    },
  },
};
</script>

<style>
.child {
  border: 3px solid green;
}
</style>